package com.gloaba.common.core.web.page;

import java.io.Serializable;
import java.util.List;

public class TableData<T> implements Serializable {

    private static final long serialVersionUID = -5154051143086736570L;

    /**
     * 总记录数
     */
    private int total;


    /**
     * 列表数据
     */
    private List<T> list;


    /**
     * 表格数据对象
     */
    public TableData() {
    }

    /**
     * 分页
     *
     * @param list  列表数据
     * @param total 总记录数
     */
    public TableData(List<T> list, int total) {
        this.list = list;
        this.total = total;
    }

    public TableData(List<T> list, long total) {
        this.list = list;
        this.total = (int) total;
    }


    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public void setTotalLong(long total) {
        this.total = (int) total;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }


}
